package com.thejoyrun.retrofit.model.user;

import com.thejoyrun.retrofit.bean.User;
import com.thejoyrun.retrofit.bean.UserDetail;

import java.util.List;

import retrofit2.annotation.Adapter;
import retrofit2.annotation.Data;
import retrofit2.http.GET;
import retrofit2.http.Path;
import rx.Observable;

/**
 * Created by kkmike999 on 2016/05/08.
 *
 * 请求User信息
 */
public interface UserService {

	@GET("/joyrun/user/user_{uid}.json")
	Observable<User> loadUser(@Path("uid") int uid);

	@Data("datas")
	@GET("/joyrun/user/user_list.json")
	Observable<List<User>> loadUserList();

	@Adapter(adapter = UserDetailAdapter.class)
	@Data("detail")
	@GET("/joyrun/user/user_detail_{uid}.json")
	Observable<UserDetail> loadUserDetail(@Path("uid") int uid);
}
